package com.middlegroup.pay.service.impl;

import com.middlegroup.pay.entity.InBills;
import com.middlegroup.pay.entity.RefundBills;
import com.middlegroup.pay.mapper.InBillsMapper;
import com.middlegroup.pay.mapper.RefundBillsMapper;
import com.middlegroup.pay.service.RefundBillsService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;

import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 退款订单表 服务实现类
 * </p>
 *
 * @author liguangcun123
 * @since 2019-08-09
 */
@Service
public class RefundBillsServiceImpl extends ServiceImpl<RefundBillsMapper, RefundBills> implements RefundBillsService {
    @Resource
    private RefundBillsMapper refundBillsMapper;

    @Override
    public boolean getByMerchantBillNo(String merchantBillNo) {
        return StringUtils.isEmpty(refundBillsMapper.getByMerchantBillNo(merchantBillNo));
    }

    @Override
    public RefundBills getByMBillNo(String billNo) {
        return refundBillsMapper.getByMBillNo(billNo);
    }

    @Override
    public RefundBills getByOutRequestNo(String outRequestNo) {
        return refundBillsMapper.getByOutRequestNo(outRequestNo);
    }

	@Override
	public RefundBills getByRefundNo(String refundNo) {
		return refundBillsMapper.getByRefundNo(refundNo);
	}
}
